package mdt.program;

import org.tigris.gef.base.*;
import mdt.action.*;
import mdt.action.CreateNodeAction;
import mdt.ext.PaletteFigExt;
import mdt.model.*;

import javax.swing.*;

public class MDTPalette extends PaletteFigExt {

    /** Construct a new palette of example nodes for the Example application */
    public MDTPalette() {
        super();
    }

    /** Define a button to make for the Example application */
    public void defineButtons() {
        super.defineButtons();

        addSeparator();
        add(new CreateNodeAction(IMDTComment.class, "MDTComment"));
        add(new ActionAddNetworkDevice());
        add(new CmdSetMode(ModeCreateDiamondChoice.class, "DiamondChoice"));
        add(new CmdSetMode(ModeCreateMessage.class, "edgeClass", ISendMessage.class, "SendMessage"));
        add(new CmdSetMode(ModeCreateMessage.class, "edgeClass", IReplyMessage.class, "ReplyMessage"));
        add(new CmdSetMode(ModeCreateMessage.class, "edgeClass", IDualWayMessage.class, "DualWayMessage"));
        add(new CmdSetMode(ModeCreateMessage.class, "edgeClass", IFailedMessage.class, "FailedMessage"));
        add(new CmdSetMode(ModeCreateLinkEdge.class, "edgeClass", ICommentLink.class, "CommentLink"));
        add(new CmdSetMode(ModeCreateTextEdge.class, "edgeClass", ITextEdge.class, "TextEdge"));
        add(new CmdSetMode(ModeCreateArrowTextEdge.class, "edgeClass", IArrowTextEdge.class, "ArrowTextEdge"));
        addSeparator();
        //add(new GroupAction());
        //add(new UngroupAction());
        JToggleButton jtb = addToggle(new StrictEdgeModeAction());
        jtb.setSelected(true);
        //add(new CmdSetMode(ModeCreateStickyComments.class, "Class", INetworkDeviceComments.class, "NetworkDeviceComments"));
    }
}
